package com.unknowpupil.web.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;

import com.unknowpupil.web.base.AbstractBaseDomain;
import lombok.Data;

@Data
@Table(name = "coin_transaction")
public class Transaction  extends AbstractBaseDomain implements Serializable {

    /**
     * 版本号 默认0
     */
    @Column(name = "version")
    private Long version;


    /**
     * 转账方
     */
    @Column(name = "send")
    private String send;

    /**
     * 接收方
     */
    @Column(name = "`get`")
    private String get;

    /**
     * 交易hash
     */
    @Column(name = "txn_hash")
    private String txnHash;

    /**
     * 区块高度
     */
    @Column(name = "block")
    private Long block;

    /**
     * 交易多少余额
     */
    @Column(name = "send_balance")
    private BigDecimal sendBalance;

    /**
     * 手续费
     */
    @Column(name = "txn_fee")
    private BigDecimal txnFee;

    /**
     * eth中为交易次数，bit中为找到区块的随机数，不一定返回得有。
     */
    @Column(name = "nonce")
    private Integer nonce;

    /**
     * 发送人
     */
    @Column(name = "send_user")
    private String sendUser;

    /**
     * 接收人
     */
    @Column(name = "get_user")
    private String getUser;

    /**
     * 币种名
     */
    @Column(name = "currency")
    private String currency;

    /**
     * 得到多少余额
     */
    @Column(name = "get_balance")
    private BigDecimal getBalance;

    private static final long serialVersionUID = 1L;
}
